﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RCodeType.cs" company="Rolosoft Ltd">
//   © Rolosoft Ltd
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

#region License

// Copyright 2013 Rolosoft Ltd
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#endregion

namespace Rsft.Net.Dns.Entities
{
    /// <summary>
    ///     The r code type.
    /// </summary>
    public enum RCodeType
    {
        /// <summary>
        ///     No Error                           [RFC1035]
        /// </summary>
        NoError = 0, 

        /// <summary>
        ///     Format Error                       [RFC1035]
        /// </summary>
        FormErr = 1, 

        /// <summary>
        ///     Server Failure                     [RFC1035]
        /// </summary>
        ServFail = 2, 

        /// <summary>
        ///     Non-Existent Domain                [RFC1035]
        /// </summary>
        NXDomain = 3, 

        /// <summary>
        ///     Not Implemented                    [RFC1035]
        /// </summary>
        NotImp = 4, 

        /// <summary>
        ///     Query Refused                      [RFC1035]
        /// </summary>
        Refused = 5, 

        /// <summary>
        ///     Name Exists when it should not     [RFC2136]
        /// </summary>
        YXDomain = 6, 

        /// <summary>
        ///     RR Set Exists when it should not   [RFC2136]
        /// </summary>
        YXRRSet = 7, 

        /// <summary>
        ///     RR Set that should exist does not  [RFC2136]
        /// </summary>
        NXRRSet = 8, 

        /// <summary>
        ///     Server Not Authoritative for zone  [RFC2136]
        /// </summary>
        NotAuth = 9, 

        /// <summary>
        ///     Name not contained in zone         [RFC2136]
        /// </summary>
        NotZone = 10, 

        /// <summary>
        ///     Reserved 11
        /// </summary>
        RESERVED11 = 11, 

        /// <summary>
        ///     Reserved 12
        /// </summary>
        RESERVED12 = 12, 

        /// <summary>
        ///     Reserved 13
        /// </summary>
        RESERVED13 = 13, 

        /// <summary>
        ///     Reserved 14
        /// </summary>
        RESERVED14 = 14, 

        /// <summary>
        ///     Reserved 15
        /// </summary>
        RESERVED15 = 15, 

        /// <summary>
        ///     Bad OPT Version                    [RFC2671]
        /// </summary>
        BADVERSSIG = 16, 

        /// <summary>
        ///     Key not recognized                 [RFC2845]
        /// </summary>
        BADKEY = 17, 

        /// <summary>
        ///     Signature out of time window       [RFC2845]
        /// </summary>
        BADTIME = 18, 

        /// <summary>
        ///     Bad TKEY Mode                      [RFC2930]
        /// </summary>
        BADMODE = 19, 

        /// <summary>
        ///     Duplicate key name                 [RFC2930]
        /// </summary>
        BADNAME = 20, 

        /// <summary>
        ///     Algorithm not supported            [RFC2930]
        /// </summary>
        BADALG = 21, 

        /// <summary>
        ///     Bad Truncation                     [RFC4635]
        /// </summary>
        BADTRUNC = 22

        /*
            23-3840              available for assignment
                0x0016-0x0F00
            3841-4095            Private Use
                0x0F01-0x0FFF
            4096-65535           available for assignment
                0x1000-0xFFFF
        */
    }
}